CC = gcc
VERSION = 1.0
X11INC = /usr/X11R6/include
X11LIB = /usr/X11R6/lib
DESTDIR = /usr

# includes and libs
INCS = -I/usr/include -I$(X11INC)
LIBS = -L/usr/lib -lc -L${X11LIB} -lX11 `curl-config --libs` `xml2-config --libs` -lpthread

# flags
CPPFLAGS = -DVERSION=\"${VERSION}\"
CFLAGS = -g -std=c99 -pedantic -Wall -O0 ${CPPFLAGS} `xml2-config --cflags` -Wno-pointer-sign

LDFLAGS = -g ${LIBS}
SRCS = main.c xinterface.c clock.c gweather.c curl_sax.c
OBJS = $(SRCS:.c=.o)

MAIN = dwmstatus

.PHONY: depend clean

all:$(MAIN)
	@echo dwmstatus has been compiled

$(MAIN): $(OBJS)
	$(CC) $(LDFLAGS) $^ -o $@ $(LDLIBS)

.c.o:
	$(CC) $(CFLAGS) $(INCS) -c $< -o $@

clean:
	rm *.o $(MAIN)

install:
	@echo installing executable file to $(DESTDIR)/bin
	@mkdir -p $(DESTDIR)/bin
	@cp -f $(MAIN) $(DESTDIR)/bin
	@chmod 755 $(DESTDIR)/bin/$(MAIN)

depend: $(SRCS)
	makedepend $(INCS) $^

# DO NOT REMOVE# DO NOT DELETE

main.o: /usr/include/stdio.h /usr/include/features.h
main.o: /usr/include/bits/predefs.h /usr/include/sys/cdefs.h
main.o: /usr/include/bits/wordsize.h /usr/include/gnu/stubs.h
main.o: /usr/include/gnu/stubs-32.h /usr/include/bits/types.h
main.o: /usr/include/bits/typesizes.h /usr/include/libio.h
main.o: /usr/include/_G_config.h /usr/include/wchar.h
main.o: /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h
main.o: /usr/include/unistd.h /usr/include/bits/posix_opt.h
main.o: /usr/include/bits/environments.h /usr/include/bits/confname.h
main.o: /usr/include/getopt.h config.h xinterface.h clock.h
xinterface.o: /usr/include/X11/Xlib.h /usr/include/sys/types.h
xinterface.o: /usr/include/features.h /usr/include/bits/predefs.h
xinterface.o: /usr/include/sys/cdefs.h /usr/include/bits/wordsize.h
xinterface.o: /usr/include/gnu/stubs.h /usr/include/gnu/stubs-32.h
xinterface.o: /usr/include/bits/types.h /usr/include/bits/typesizes.h
xinterface.o: /usr/include/time.h /usr/include/endian.h
xinterface.o: /usr/include/bits/endian.h /usr/include/bits/byteswap.h
xinterface.o: /usr/include/sys/select.h /usr/include/bits/select.h
xinterface.o: /usr/include/bits/sigset.h /usr/include/bits/time.h
xinterface.o: /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h
xinterface.o: /usr/include/X11/X.h /usr/include/X11/Xfuncproto.h
xinterface.o: /usr/include/X11/Xosdefs.h
clock.o: /usr/include/time.h /usr/include/bits/types.h
clock.o: /usr/include/features.h /usr/include/bits/predefs.h
clock.o: /usr/include/sys/cdefs.h /usr/include/bits/wordsize.h
clock.o: /usr/include/gnu/stubs.h /usr/include/gnu/stubs-32.h
clock.o: /usr/include/bits/typesizes.h config.h
# DO NOT DELETE

main.o: /usr/include/stdio.h /usr/include/features.h
main.o: /usr/include/bits/predefs.h /usr/include/sys/cdefs.h
main.o: /usr/include/bits/wordsize.h /usr/include/gnu/stubs.h
main.o: /usr/include/gnu/stubs-32.h /usr/include/bits/types.h
main.o: /usr/include/bits/typesizes.h /usr/include/libio.h
main.o: /usr/include/_G_config.h /usr/include/wchar.h
main.o: /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h
main.o: /usr/include/unistd.h /usr/include/bits/posix_opt.h
main.o: /usr/include/bits/environments.h /usr/include/bits/confname.h
main.o: /usr/include/getopt.h /usr/include/curl/curl.h
main.o: /usr/include/curl/curlver.h /usr/include/curl/curlbuild.h
main.o: /usr/include/sys/types.h /usr/include/time.h /usr/include/endian.h
main.o: /usr/include/bits/endian.h /usr/include/bits/byteswap.h
main.o: /usr/include/sys/select.h /usr/include/bits/select.h
main.o: /usr/include/bits/sigset.h /usr/include/bits/time.h
main.o: /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h
main.o: /usr/include/stdint.h /usr/include/bits/wchar.h
main.o: /usr/include/inttypes.h /usr/include/sys/socket.h
main.o: /usr/include/sys/uio.h /usr/include/bits/uio.h
main.o: /usr/include/bits/socket.h /usr/include/bits/sockaddr.h
main.o: /usr/include/curl/curlrules.h /usr/include/limits.h
main.o: /usr/include/limits.h /usr/include/bits/posix1_lim.h
main.o: /usr/include/bits/local_lim.h /usr/include/linux/limits.h
main.o: /usr/include/bits/posix2_lim.h /usr/include/sys/time.h
main.o: /usr/include/curl/easy.h /usr/include/curl/multi.h
main.o: /usr/include/curl/curl.h config.h xinterface.h clock.h gweather.h
main.o: dwmstatus_types.h /usr/include/string.h /usr/include/xlocale.h
xinterface.o: /usr/include/X11/Xlib.h /usr/include/sys/types.h
xinterface.o: /usr/include/features.h /usr/include/bits/predefs.h
xinterface.o: /usr/include/sys/cdefs.h /usr/include/bits/wordsize.h
xinterface.o: /usr/include/gnu/stubs.h /usr/include/gnu/stubs-32.h
xinterface.o: /usr/include/bits/types.h /usr/include/bits/typesizes.h
xinterface.o: /usr/include/time.h /usr/include/endian.h
xinterface.o: /usr/include/bits/endian.h /usr/include/bits/byteswap.h
xinterface.o: /usr/include/sys/select.h /usr/include/bits/select.h
xinterface.o: /usr/include/bits/sigset.h /usr/include/bits/time.h
xinterface.o: /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h
xinterface.o: /usr/include/X11/X.h /usr/include/X11/Xfuncproto.h
xinterface.o: /usr/include/X11/Xosdefs.h
clock.o: /usr/include/time.h /usr/include/bits/types.h
clock.o: /usr/include/features.h /usr/include/bits/predefs.h
clock.o: /usr/include/sys/cdefs.h /usr/include/bits/wordsize.h
clock.o: /usr/include/gnu/stubs.h /usr/include/gnu/stubs-32.h
clock.o: /usr/include/bits/typesizes.h config.h
gweather.o: /usr/include/stdio.h /usr/include/features.h
gweather.o: /usr/include/bits/predefs.h /usr/include/sys/cdefs.h
gweather.o: /usr/include/bits/wordsize.h /usr/include/gnu/stubs.h
gweather.o: /usr/include/gnu/stubs-32.h /usr/include/bits/types.h
gweather.o: /usr/include/bits/typesizes.h /usr/include/libio.h
gweather.o: /usr/include/_G_config.h /usr/include/wchar.h
gweather.o: /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h
gweather.o: /usr/include/stdlib.h /usr/include/bits/waitflags.h
gweather.o: /usr/include/bits/waitstatus.h /usr/include/endian.h
gweather.o: /usr/include/bits/endian.h /usr/include/bits/byteswap.h
gweather.o: /usr/include/sys/types.h /usr/include/time.h
gweather.o: /usr/include/sys/select.h /usr/include/bits/select.h
gweather.o: /usr/include/bits/sigset.h /usr/include/bits/time.h
gweather.o: /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h
gweather.o: /usr/include/alloca.h /usr/include/sys/param.h
gweather.o: /usr/include/limits.h /usr/include/limits.h
gweather.o: /usr/include/bits/posix1_lim.h /usr/include/bits/local_lim.h
gweather.o: /usr/include/linux/limits.h /usr/include/bits/posix2_lim.h
gweather.o: /usr/include/linux/param.h /usr/include/pthread.h
gweather.o: /usr/include/sched.h /usr/include/bits/sched.h
gweather.o: /usr/include/bits/setjmp.h /usr/include/unistd.h
gweather.o: /usr/include/bits/posix_opt.h /usr/include/bits/environments.h
gweather.o: /usr/include/bits/confname.h /usr/include/getopt.h
gweather.o: /usr/include/curl/curl.h /usr/include/curl/curlver.h
gweather.o: /usr/include/curl/curlbuild.h /usr/include/stdint.h
gweather.o: /usr/include/bits/wchar.h /usr/include/inttypes.h
gweather.o: /usr/include/sys/socket.h /usr/include/sys/uio.h
gweather.o: /usr/include/bits/uio.h /usr/include/bits/socket.h
gweather.o: /usr/include/bits/sockaddr.h /usr/include/curl/curlrules.h
gweather.o: /usr/include/sys/time.h /usr/include/curl/easy.h
gweather.o: /usr/include/curl/multi.h /usr/include/curl/curl.h
gweather.o: /usr/include/string.h /usr/include/xlocale.h config.h
gweather.o: dwmstatus_types.h curl_sax.h gweather.h
curl_sax.o: /usr/include/sys/param.h /usr/include/limits.h
curl_sax.o: /usr/include/features.h /usr/include/bits/predefs.h
curl_sax.o: /usr/include/sys/cdefs.h /usr/include/bits/wordsize.h
curl_sax.o: /usr/include/gnu/stubs.h /usr/include/gnu/stubs-32.h
curl_sax.o: /usr/include/limits.h /usr/include/bits/posix1_lim.h
curl_sax.o: /usr/include/bits/local_lim.h /usr/include/linux/limits.h
curl_sax.o: /usr/include/bits/posix2_lim.h /usr/include/linux/param.h
curl_sax.o: /usr/include/sys/types.h /usr/include/bits/types.h
curl_sax.o: /usr/include/bits/typesizes.h /usr/include/time.h
curl_sax.o: /usr/include/endian.h /usr/include/bits/endian.h
curl_sax.o: /usr/include/bits/byteswap.h /usr/include/sys/select.h
curl_sax.o: /usr/include/bits/select.h /usr/include/bits/sigset.h
curl_sax.o: /usr/include/bits/time.h /usr/include/sys/sysmacros.h
curl_sax.o: /usr/include/bits/pthreadtypes.h /usr/include/string.h
curl_sax.o: /usr/include/xlocale.h /usr/include/curl/curl.h
curl_sax.o: /usr/include/curl/curlver.h /usr/include/curl/curlbuild.h
curl_sax.o: /usr/include/stdint.h /usr/include/bits/wchar.h
curl_sax.o: /usr/include/inttypes.h /usr/include/sys/socket.h
curl_sax.o: /usr/include/sys/uio.h /usr/include/bits/uio.h
curl_sax.o: /usr/include/bits/socket.h /usr/include/bits/sockaddr.h
curl_sax.o: /usr/include/curl/curlrules.h /usr/include/stdio.h
curl_sax.o: /usr/include/libio.h /usr/include/_G_config.h
curl_sax.o: /usr/include/wchar.h /usr/include/bits/stdio_lim.h
curl_sax.o: /usr/include/bits/sys_errlist.h /usr/include/sys/time.h
curl_sax.o: /usr/include/curl/easy.h /usr/include/curl/multi.h
curl_sax.o: /usr/include/curl/curl.h curl_sax.h config.h
